package com.mallcloud.mall.common.core.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@Getter
@AllArgsConstructor
public enum PublicTypeEnum {

	DEFAULT("0", "默认"),
	RETRIEVAL("1", "检索"),
	ORIGINAL("2", "原文"),
	REPORT("3", "报表"),
	SECURITY("4", "安全"),
	doc("5", "文档"),
	NEWS("6", "消息"),
	OTHER("9", "其他"),
	;

	private String type;
	private String description;

	public static String getDecs(String type) {
		return Arrays.stream(values()).filter(x -> x.getType().equals(type)).findFirst().get().getDescription();
	}
}
